Getting started

Prepare your build.properties

M.E.T.A can install your application into a servlet container, if you supply its location (If you're writing web applications with maven, this is a good idea anyway). To do so, add the following line to your personal build.properties file which is normally located in your home directory.

For Unix:
maven.appserver.home = /opt/jakarta-tomcat-5.0.24

For Windows:
maven.appserver.home = C:/Program Files/Apache Software Foundation/Tomcat-5.0.24
  • Please make sure that you do not append the webapp subdirectory. This property should contain the root of your application server!
  • If you are using Windows, you must still use the slash ("/"), not the backslash for the directory paths!

Hello World

Hello everybody. Feeling good? Are you ready to rock? Are you ready to roll? OK, let's do it.

Enter the following command:

maven -Dturbine.app.name=helloworld turbine:setup

This produces some maven output and creates a subdirectory in your current directory called "helloworld". It should have a directory structure like this:

helloworld
|-- conf
`-- src
    |-- images
    |-- java
    |   `-- org
    |       `-- apache
    |           `-- turbine
    |               `-- app
    |                   `-- helloworld
    |                       `-- modules
    |                           |-- actions
    |                           |-- layouts
    |                           |-- navigations
    |                           |-- pages
    |                           `-- screens
    |-- pages
    |-- resources
    |-- schema
    |-- scripts
    |-- style
    |-- templates
    |   |-- layouts
    |   |-- macros
    |   |-- navigations
    |   `-- screens
    `-- test

M.E.T.A. has set up the skeleton of your application. It even contains a welcome page to show you that everything is fine.

Enter the helloworld directory.

Compile and deploy the application to your web container:

maven turbine:deploy
Restart your web container or force it to reload its applications.

Point your browser to the deployed application (if you use Tomcat running on your local machine, this would be http://localhost:8080/helloworld/).

The result should look like this:



You have successfully installed and run your very first Turbine application! The gory details about the M.E.T.A. plugin are found on the Using M.E.T.A. page.